namespace RAG.Domain.Services;

/// <summary>
/// 文件存储抽象接口 - 领域层
/// </summary>
public interface IFileStorage
{
    /// <summary>
    /// 保存文件
    /// </summary>
    Task<string> SaveAsync(FileInfo file);
    
    /// <summary>
    /// 删除文件
    /// </summary>
    Task<bool> DeleteAsync(string fileUrl);
    
    /// <summary>
    /// 检查文件是否存在
    /// </summary>
    Task<bool> ExistsAsync(string fileUrl);
}

/// <summary>
/// 文件信息 - 领域层的文件抽象
/// </summary>
public class FileInfo
{
    public string FileName { get; set; } = default!;
    public string ContentType { get; set; } = default!;
    public long Length { get; set; }
    public byte[] Content { get; set; } = default!;
} 